package com.ysyc.driver_ee.tools;

import com.google.gson.Gson;

import java.util.Map;

public class GsonUtils {
    private static Gson gson = null;

    static {
        if (gson == null) {
            gson = new Gson();
        }
    }

    /**
     * @param map
     * @return map转化成json
     */
    public static String mapToJson(Map<String, String> map) {
        String json = gson.toJson(map);
        return json;
    }
}
